﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI.InventoryMaterialQueryListUIModel
{
	[Serializable]
	public partial class InventoryMaterialQueryListUIModelModel : UIModel
	{
		#region Constructor
		public InventoryMaterialQueryListUIModelModel() : base("InventoryMaterialQueryListUIModel")
		{
			InitClass();
			this.SetResourceInfo("c6a92b98-cde3-46fa-9d77-6a17f52418f3");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private InventoryMaterialQueryListUIModelModel(bool isInit) : base("InventoryMaterialQueryListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new InventoryMaterialQueryListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private InventoryMaterialQueryViewView viewInventoryMaterialQueryView;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public InventoryMaterialQueryViewView InventoryMaterialQueryView
		{
			get { return (InventoryMaterialQueryViewView)this["InventoryMaterialQueryView"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewInventoryMaterialQueryView = new InventoryMaterialQueryViewView(this);
			this.viewInventoryMaterialQueryView.SetResourceInfo("e231a93b-993b-4c3b-bb26-ae0e684c51a7");
			this.Views.Add(this.viewInventoryMaterialQueryView);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class InventoryMaterialQueryViewView : UIView
	{
		#region Constructor
		public InventoryMaterialQueryViewView(IUIModel model) : base(model,"InventoryMaterialQueryView","", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private InventoryMaterialQueryViewView():base(null,"InventoryMaterialQueryView","", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new InventoryMaterialQueryViewView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldOrg
		{
			get { return this.Fields["Org"]; }
		}
		public IUIField FieldProductDeptName
		{
			get { return this.Fields["ProductDeptName"]; }
		}
		public IUIField FieldWarehouse
		{
			get { return this.Fields["Warehouse"]; }
		}
		public IUIField FieldWarehouseCode
		{
			get { return this.Fields["WarehouseCode"]; }
		}
		public IUIField FieldWarehouseName
		{
			get { return this.Fields["WarehouseName"]; }
		}
		public IUIField FieldItemMaster
		{
			get { return this.Fields["ItemMaster"]; }
		}
		public IUIField FieldItemMasterCode
		{
			get { return this.Fields["ItemMasterCode"]; }
		}
		public IUIField FieldItemMasterName
		{
			get { return this.Fields["ItemMasterName"]; }
		}
		public IUIField FieldRawItemMastercode
		{
			get { return this.Fields["RawItemMastercode"]; }
		}
		public IUIField FieldModel
		{
			get { return this.Fields["Model"]; }
		}
		public IUIField FieldSPECS
		{
			get { return this.Fields["SPECS"]; }
		}
		public IUIField FieldProject
		{
			get { return this.Fields["Project"]; }
		}
		public IUIField FieldProjectCode
		{
			get { return this.Fields["ProjectCode"]; }
		}
		public IUIField FieldProjectName
		{
			get { return this.Fields["ProjectName"]; }
		}
		public IUIField FieldSalesperson
		{
			get { return this.Fields["Salesperson"]; }
		}
		public IUIField FieldSalesAssistant
		{
			get { return this.Fields["SalesAssistant"]; }
		}
		public IUIField FieldAvailableInventory
		{
			get { return this.Fields["AvailableInventory"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public InventoryMaterialQueryViewDefaultFilterFilter DefaultFilter
		{
			get { return (InventoryMaterialQueryViewDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","170bd0d9-16be-481d-9f70-8ceb425d0701");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","9c4cc93f-96f8-4e60-996f-f19c0c080f56");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","75f46801-6475-46aa-87df-3880658606a1");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","3dc4c3c5-1fa8-49df-a0e3-fa739979a558");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","d0dccf7d-42c1-4029-b3d8-b7aacec2083d");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","381e9eee-2285-462b-8b13-18cb1107bb62");
			UIModelRuntimeFactory.AddNewUIField(this,"Org", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","31988874-27f5-43d0-9259-640b6ee1f09e");
			UIModelRuntimeFactory.AddNewUIField(this,"ProductDeptName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","05a50ddf-7a2c-48dd-8525-010c93324330");
			UIModelRuntimeFactory.AddNewUIField(this,"Warehouse", typeof(Int64), true,"","UFIDA.U9.CBO.SCM.Warehouse.Warehouse", "", false,false, false, "",false,(UIFieldType)4,"0fac5c83-2ab0-428f-bf82-c363857b37be","c3434e19-9057-4939-bbeb-758130036736");
			UIModelRuntimeFactory.AddNewUIField(this,"WarehouseCode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","fd49bd30-72a9-4ef0-bd0c-1041865b80cb");
			UIModelRuntimeFactory.AddNewUIField(this,"WarehouseName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","88bc8030-200b-4c8a-9563-d0d18df74720");
			UIModelRuntimeFactory.AddNewUIField(this,"ItemMaster", typeof(Int64), true,"","UFIDA.U9.CBO.SCM.Item.ItemMaster", "", false,false, false, "",false,(UIFieldType)4,"636d3e47-48aa-47fc-aca4-e6322bce775b","7cf37875-baf4-4e9f-988b-1814599d730b");
			UIModelRuntimeFactory.AddNewUIField(this,"ItemMasterCode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","e664e719-502a-4776-9bc4-eb7b4007a8a6");
			UIModelRuntimeFactory.AddNewUIField(this,"ItemMasterName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","86c9e627-25bd-48dc-9248-c8c39aa072d7");
			UIModelRuntimeFactory.AddNewUIField(this,"RawItemMastercode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","bbb3cf95-b558-4f35-ad7a-61a7cf9b8f4f");
			UIModelRuntimeFactory.AddNewUIField(this,"Model", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","397ea9bc-2c0d-487f-8c56-3c763e295546");
			UIModelRuntimeFactory.AddNewUIField(this,"SPECS", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","260a8e35-9874-402a-a614-6e5792ca4a19");
			UIModelRuntimeFactory.AddNewUIField(this,"Project", typeof(Int64), true,"","UFIDA.U9.CBO.SCM.ProjectTask.Project", "", false,false, false, "",false,(UIFieldType)4,"7bc6294b-1a35-4e37-acfe-5abc5602f12f","4ef1b27c-51d8-449f-ac7e-84c301e09fb0");
			UIModelRuntimeFactory.AddNewUIField(this,"ProjectCode", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","082011bd-d06d-4acc-be14-ab755acced3b");
			UIModelRuntimeFactory.AddNewUIField(this,"ProjectName", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","dacdee5e-f6a3-4d7d-ba5a-20e44e1efdd7");
			UIModelRuntimeFactory.AddNewUIField(this,"Salesperson", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","57d47f69-8e9c-474d-b7f3-121a257ab88c");
			UIModelRuntimeFactory.AddNewUIField(this,"SalesAssistant", typeof(String), true,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","01fca1ab-0870-41b9-a796-4c641c6ea20b");
			UIModelRuntimeFactory.AddNewUIField(this,"AvailableInventory", typeof(String), true,"","System.Decimal", "", false,false, false, "",false,(UIFieldType)1,"91031687-94bb-4988-a939-df7bf999ef4f","1f5bb2c9-f5f9-4fd6-ad73-ee937cbc53ae");


			this.CurrentFilter = new InventoryMaterialQueryViewDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new InventoryMaterialQueryViewRecord(builder);
		}
		#endregion

		#region new method
		public new InventoryMaterialQueryViewRecord FocusedRecord
		{
			get { return (InventoryMaterialQueryViewRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new InventoryMaterialQueryViewRecord AddNewUIRecord()
		{	
			return (InventoryMaterialQueryViewRecord)base.AddNewUIRecord();
		}
		public new InventoryMaterialQueryViewRecord NewUIRecord()
		{	
			return (InventoryMaterialQueryViewRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class InventoryMaterialQueryViewRecord : UIRecord
	{
		#region Constructor
		public InventoryMaterialQueryViewRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private InventoryMaterialQueryViewView uiviewInventoryMaterialQueryView
		{
			get { return (InventoryMaterialQueryViewView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new InventoryMaterialQueryViewRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewInventoryMaterialQueryView.FieldID);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldID] = value;
			}
		}
		
		
		public  DateTime CreatedOn
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldCreatedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewInventoryMaterialQueryView.FieldCreatedOn);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldCreatedBy);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime ModifiedOn
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldModifiedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewInventoryMaterialQueryView.FieldModifiedOn);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldModifiedBy);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64 SysVersion
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldSysVersion] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewInventoryMaterialQueryView.FieldSysVersion);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldSysVersion] = value;
			}
		}
		
		
		public  String Org
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldOrg] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldOrg);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldOrg] = value;
			}
		}
		
		
		public  String ProductDeptName
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldProductDeptName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldProductDeptName);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldProductDeptName] = value;
			}
		}
		
		
		public  Int64? Warehouse
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldWarehouse] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewInventoryMaterialQueryView.FieldWarehouse);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldWarehouse] = value;
			}
		}
		
		
		public  String WarehouseCode
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldWarehouseCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldWarehouseCode);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldWarehouseCode] = value;
			}
		}
		
		
		public  String WarehouseName
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldWarehouseName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldWarehouseName);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldWarehouseName] = value;
			}
		}
		
		
		public  Int64? ItemMaster
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldItemMaster] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewInventoryMaterialQueryView.FieldItemMaster);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldItemMaster] = value;
			}
		}
		
		
		public  String ItemMasterCode
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldItemMasterCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldItemMasterCode);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldItemMasterCode] = value;
			}
		}
		
		
		public  String ItemMasterName
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldItemMasterName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldItemMasterName);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldItemMasterName] = value;
			}
		}
		
		
		public  String RawItemMastercode
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldRawItemMastercode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldRawItemMastercode);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldRawItemMastercode] = value;
			}
		}
		
		
		public  String Model
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldModel] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldModel);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldModel] = value;
			}
		}
		
		
		public  String SPECS
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldSPECS] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldSPECS);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldSPECS] = value;
			}
		}
		
		
		public  Int64? Project
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldProject] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewInventoryMaterialQueryView.FieldProject);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldProject] = value;
			}
		}
		
		
		public  String ProjectCode
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldProjectCode] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldProjectCode);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldProjectCode] = value;
			}
		}
		
		
		public  String ProjectName
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldProjectName] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldProjectName);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldProjectName] = value;
			}
		}
		
		
		public  String Salesperson
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldSalesperson] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldSalesperson);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldSalesperson] = value;
			}
		}
		
		
		public  String SalesAssistant
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldSalesAssistant] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldSalesAssistant);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldSalesAssistant] = value;
			}
		}
		
		
		public  String AvailableInventory
		{
			get{
				//object value = this[this.uiviewInventoryMaterialQueryView.FieldAvailableInventory] ;
				//return (String)value;
				return GetValue<String>(this.uiviewInventoryMaterialQueryView.FieldAvailableInventory);
			}
			set{
				this[this.uiviewInventoryMaterialQueryView.FieldAvailableInventory] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class InventoryMaterialQueryViewDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public InventoryMaterialQueryViewDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private InventoryMaterialQueryViewDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new InventoryMaterialQueryViewDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}